package geppetto.reordering.graph.scorers;

import geppetto.phraseHMM.phraseExtraction.extractedphrase.ExtractedPhrasePair;

public class NoDiscontinuousScorer extends UnweightedGraphScorer{
	
	public static int numberOfDists = 0;
	public static int numberOfArcs = 0;
	
	@Override
	public double scoreNextArc(ExtractedPhrasePair from, ExtractedPhrasePair to) {
		double dist = to.getForeignStartPos() - 1 - from.getForeignEndPos();
		if(dist == 0) return 1;
		return 0;
	}

	@Override
	public double scorePrevArc(ExtractedPhrasePair from, ExtractedPhrasePair to) {
		double dist = from.getForeignStartPos() - 1 - to.getForeignEndPos();
/*		numberOfArcs++;
		if(dist != 0){
			System.err.println(numberOfArcs);
			System.err.println(++numberOfDists);
		}*/
		if(dist == 0) return 1;
		return 0;
	}
	
}
